<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="./js/vue.js"></script>
    <style>
        [v-cloak],[v-text],[v-html]{
            display: none;
        }
    </style>
    <title>Document</title>
</head>
<body>
    <p id="aaa" style="color:red">标签属性</p>
    <p id=aaa style=color:green>标签属性</p>
    <hr>
    <div id="app" v-cloak>
        <div>h1Str:{{ h1Str }}</div>

        <div v-html="h1Str"></div>

        <div>h1Str:{{ h1Str }}------</div>
        <div v-text="h1Str">h1Str:</div>

        <div v-text=h1Str></div>
        <div v-text=" 'h1Str:'+h1Str "></div>

        <div v-pre>
            <p>vue中可以通过{{h1Str}}取值内存变量h1Str</p>
            <p v-html="h1Str">指令不被解析</p>
        </div>
        <input type="text" disabled>

        <p>msg:{{msg}}</p>
        <p v-once>msg:{{msg}}</p>
        <div c-once>
            <p>msg:{{msg}}</p>
            <p v-html="msg"></p>
        </div>

        <p v-cloak>{{msg}}</p>
    </div>
    <script>
        setTimeout(function() {
            new Vue({
                el:"#app",
                data:{
                    h1Str:"<h1>h1字符串标签</h1>",
                    msg:"测试数据"
                }
            });
        },3000);
    </script>
</body>
</html>